#!/usr/bin/env python3
# -*- coding: utf-8 -*-

def perfect(n : int) -> bool:
    
    res = False

    if n <= 1:
        print('根据完数定义, 您应输入大于1的数！')
    else:
        s = 0
        for i in range(1, n // 2 + 1):
            if n % i == 0:
                s += i
        
        if s == n:
            res = True
    
    return res

def main():
    a = int(input('请输入一个整数：'))

    if perfect(a):
        print('%d是完数'%(a))
    else:
        print('%d不是完数'%(a))

if __name__ == '__main__':
    main()